home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
clipper
/
nftroff.zip
/
6.tr
< prev
next >
Wrap
Text File
|
1991-11-21
|
16KB
|
958 lines
.de }n
.bp
.sp .5i
..
.wh -.8i }n
.sp .5i
.po -.4i
.ll 7.5i
.ps 9
.vs 9
.in 0i
.ta 1.63265i
.sp 2
.ne 20
.ps +3
.vs +3
FT_COM3OR4() Enable use of COM3 and/or COM4 on IBM/PC compatables\.
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_COM3OR4()
Enable use of COM3 and/or COM4 on IBM/PC compatables\.
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_COM3OR4( <nPort> ) -> lSuccess
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
\fB<nPort>\fR is the COM port to enable\. Ports except 3 and 4 are ignored\.
The default is 3\.
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
a logical indicating success or failure of the operation\.
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
FT_COM3OR4() uses FT_POKE() to write to memory the correct data
to enable COM3 or COM4 on IBM-PC compatables\. The programmer will
still need to explicitly open the port with SET PRINTER or FOPEN()
to send data out the port\.
.sp
FT_COM3OR4() owes everything to FT_POKE()\.
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
.br
// attempt to enable COM3
.br
IF FT_COM3OR4( 3 )
.in 0.64i
.br
Qout("COM3 was enabled")
.in 0.4i
.br
END
.sp
.sp
.in 0.08i
\fBSource:\fR COM34\.PRG
.sp
\fBAuthor:\fR Steve Kolterman
.in 0i
.ta 1.63265i
.sp 2
.ne 20
.ps +3
.vs +3
FT_DIR2DB() Create \.DBF of directory files, using DOS filespec
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_DIR2DB()
Create \.DBF of directory files, using DOS filespec
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_DIR2DB( <cSpec> [, <cDbf> ][, <cNtx> ][, <cDrvr> ] ) -> <nErrcode>
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
\fB<cSpec>\fR can be any valid DOS file spec\., including wildcards and
.in 0.48i
single file names\.
.sp
.in 0.4i
\fB<cDbf>\fR is the name of the \.DBF to create\. If not specified, the
.in 0.48i
name \'FILES\' is used\.
.sp
.in 0.4i
\fB<cNtx>\fR is the name of the \.NTX to create\. If not specified, no
.in 0.48i
index is created\.
.sp
.in 0.4i
\fB<cDrvr>\fR is the name of the Nantucket RDD (replaceable database
.in 0.48i
driver) to use\. If not specified, the default, \'DBFNTX\', is
used\.
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
<nErrcode>, which will be one of the following:
.sp
.in 0.64i
.br
0 - no error
.br
1 - no file spec\. passed
.br
2 - no files match spec\. passed
.br
3 - network error opening <cDbf>
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
FT_DIR2DB() builds a \.DBF from and fills it with the files/data
matching any valid DOS file spec\. Fields created are \'Name\',
\'Size\', \'Date\', \'Time\', and \'Attr\' (attribute)\.
.sp
An index on the \'name\' field is also created by passing a name
for the \.NTX as a third parameter\. An optional fourth parameter
accommodates the RDDs (replaceable database drivers) Nantucket
promises\.
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
nVal:= FT_DIR2DB( "*\.dbf","dbffiles","filename" )
Creates DBFFILES\.DBF consisting of all \.DBFs in the current dir-
ectory, and also creates FILENAME\.NTX\.
.sp
nVal:= FT_DIR2DB( "*\.*","pdoxdbf","pdoxntx","paradox" )
would create a Paradox database and index consisting of all files
in the current directory\.
.sp
.in 0.08i
\fBSource:\fR DIR2DBF\.PRG
.sp
\fBAuthor:\fR Steve Kolterman
.in 0i
.ta 1.63265i
.sp 2
.ne 20
.ps +3
.vs +3
FT_EXIST() Test for existence of drive and/or subdirectory
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_EXIST()
Test for existence of drive and/or subdirectory
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_EXIST( <cDriveDir> ) -> lResult
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
\fB<cDriveDir>\fR is a character string containing drive spec (with colon)
.in 0.64i
or drive spec and path to and including subdirectory being
tested for\. Do not include backslash after subdirectory\. If
drive spec is not part of string, tests current drive\.
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
.ta 0.88i
<lResult> as logical -
.br
.ta
.in 0.64i
.br
\.T\. if drive exists, or subdirectory exists on specified drive
.br
\.F\. if drive or subdirectory does not exist
.sp
.in 0.08i
\fBDescription
.sp
.sp
.sp
\fBExamples
.sp
.in 0.32i
IF FT_EXIST( "D:" )
.in 0.56i
Qout("OK To Perform Operation On Drive D:")
.in 0.32i
ENDIF
.sp
.in 0.08i
\fBSource:\fR EXIST\.PRG
.sp
\fBAuthor:\fR Steve Kolterman
.in 0i
.ta 1.63265i
.sp 2
.ne 20
.ps +3
.vs +3
FT_GETE() Return the entire current environment
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_GETE()
Return the entire current environment
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_GETE( [ @<xReceiveVar> ] ) -> nNumStrings
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
\fB<xReceiveVar>\fR is the variable to receive the environment data\.
.sp
\fB<xReceiveVar>\fR can be a character type variable, in which case
the function will place all environment strings in the variable
separated by carriage return/line feeds (chr 13 + chr(10))\.
.sp
\fB<xReceiveVar>\fR can be an array type, in which case the function
will place each string in an array element\. The array MUST be
declared with the proper number of elements prior to passing it
to the function\. This can be done by calling FT_GETE() without
parameters first to get the number of strings in the environment\.
.sp
Note that the argument MUST be passed by reference\. Since arrays
are by nature passed by reference, the "@" symbol is optional when
passing an array\.
.sp
If no argument is passed, FT_GETE() merely returns the number
of strings in the environment\.
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
FT_GETE() returns the total number of strings found in the
current program\'s environment\.
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
This function stores ALL of the current program\'s environment
variables in either a block of text lines or in an array\. It is
useful for looking at the entire environment at once, or recording
a snapshot of it to a file for later inspection, such as when a
program error occurs\. If the value of ONE SPECIFIC variable is
desired, use Clipper\'s built-in GETE() function\.
.sp
This function uses the undocumented internal variable "_environ",
as well as the functions _strcpy(), _strcat(), and _strlen() from
CLIPPER\.LIB
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
Get the environment in text form and browse it:
.sp
.in 0.64i
.ta 0.96i
.br
cEnvBlock := ""
.br
.ta
.br
nNumStrings := FT_GETE(@cEnvBlock)
.ta 0.24i
.br
@ 0, 0 to MAXROW() - 1, MAXCOL()
.br
.ta
.ta 0.24i
.br
@ MAXROW(), 0 say \'Browse strings, press ESC to exit\.\.\.\'
.br
.ta
.br
MEMOWRIT(cEnvBlock, 1, 1, MAXROW() - 2,MAXCOL() - 1, \.F\.)
.sp
.in 0.4i
Get the environment in text form and write it to a file:
.sp
.in 0.64i
.br
cEnvBlock := ""
.br
FT_GETE(@cEnvBlock)
.br
MEMOWRIT("ENVIRON\.TXT", cEnvBlock)
.sp
.in 0.4i
Get the environment in Array form:
.sp
.in 0.64i
.br
aEnvArray := ARRAY(FT_GETE())
.br
FT_GETE(aEnvArray)
.ta 1.68i
.br
? aEnvArray[1] // "COMSPEC=C:\\COMMAND\.COM"
.br
.ta
.ta 1.68i
.br
? aEnvArray[2] // "PATH=C:\\;C:\\DOS;C:\\UTIL;C:\\CLIP50\\BIN"
.br
.ta
.in 0.8i
.br
\.\.\. etc \.\.\.
.sp
.in 0.08i
\fBSource:\fR GETENVRN\.C
.sp
\fBAuthor:\fR Rick Whitt
.in 0i
.ta 1.63265i
.sp 2
.ne 20
.ps +3
.vs +3
FT_LINKED() Determine if a function was linked in
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_LINKED()
Determine if a function was linked in
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_LINKED( <cString> ) -> lResult
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
\fB<cString>\fR is a character string containing one or more function
.in 1.2i
calls
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
\.T\. if all functions within the string are currently linked into
the application, \.F\. if one or more aren\'t\. See below for a
definition of "function\."
.sp
.in 0.08i
\fBDescription
.sp
.sp
.in 0.4i
This function would be used in data driven application to determine
whether or not a macro compiled function was linked in\.
.sp
Several functions can be passed, and nested, in <cString>\.
.sp
Caveat: Some function calls are converted by the preprocessor
into other function calls\. You cannot have these types of
functions in a macro compiled string as they never exist at
runtime\. FT_LINKED will correctly tell you that they are invalid\.
.sp
For instance: there is no function called SORT() in any of the
Nantucket LIBraries, but i